<style scoped>
.foot_menu{
    background-color: #f2f6fc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    position: relative;
}
.foot_menu > p{
    text-align: center;
    font-size: 14px;
    line-height: 36px;
}
.foot_menu > button{
    font-size: 14px;
    color: rgb(97, 97, 97);
    border:none;
    outline: none;
    cursor: pointer;
    background-color: transparent;
}
.foot_menu > button.active{
    cursor:not-allowed;
}
.foot_menu > .next{
    position: absolute;
    right: 20px;
    top: 10px;
}
.foot_menu > .prev{
    position: absolute;
    left: 20px;
    top: 10px;
}
</style>
<template>
<div class="foot_menu">
    <p>{{current}} / {{count}}</p>
    <button class="next" :disabled="nn" :class="nn?'active':''"  @click="next">{{nn ? '没有下一页了~' : '下一页'}}</button>
    <button class="prev" :disabled="pp" :class="pp?'active':''" @click="prev">{{ pp ? '没有上一页了~': '上一页'}}</button>
</div>
</template>

<script>
export default {
    props:{
        current:{
            type:Number,
            default:1
        },
        count:{
            type:Number,
            default:6
        },
    },
    data() {
        return {

        }
    },
    computed:{
        nn(){
            return this.current == this.count ? true : false;
        },
        pp(){
            return this.current == 1 ? true : false;
        }
    },
    methods:{
        next(){
            this.$emit('next')
        },
        prev(){
            this.$emit('prev')
        }
    }
}
</script>